package com.swf.jpa.test;

import java.util.List;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.swf.jpa.model.Tyebpayinrequest;
import com.swf.jpa.service.TyebpayinrequestService;

public class SimpleSpringJpaDemo { 
    public static void main(String[] args) { 
     //   UserInfo userInfo = new UserServiceImpl().createUser("ZhangJianPing",  18);
    /*	UserInfo newUserinfo = new UserInfo();
    	newUserinfo.setId(3);
    	newUserinfo.setName("lisi");
    	newUserinfo.setAge(12);
        UserInfo userInfo = new UserServiceImpl().updateUser(newUserinfo);
    	System.out.println(userInfo);*/
    	ApplicationContext ac = new ClassPathXmlApplicationContext("META-INF/spring/springContext.xml");
    	TyebpayinrequestService service = ac.getBean(TyebpayinrequestService.class);
    	List<Tyebpayinrequest> ulist = service.findAll();
    	for (Tyebpayinrequest ui:ulist){
    		System.out.println(ui.toString());
    	}
    	System.out.println(ulist.size());
    	Tyebpayinrequest Tyebpayinrequest = service.findByVcPartnerrequestno("00999000000003002");
    	System.out.println(Tyebpayinrequest.toString());
    } 
 } 